<?php
namespace app\admin\validate;
use think\facade\Db;
use think\Validate;

class Site extends Validate
{

    protected $rule=[
        'site_id'    =>'require',
        'name'    =>'require',
        'key'    =>'require',
        'webname'    =>'require',
    ];
    protected $message = [
        'site_id.require'      => '关键参数不能为空',
        'name.require'    => '站点名称不能为空',
        'key.require'     =>'站点标识不能为空',
        'webname.require' =>'站点标题不能为空',
    ];
    protected $scene = [
        'add' =>['name','key','webname'],
        'edit'=>['site_id','name','key','webname'],
        'del' =>['site_id'],
    ];

}